<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script>
        //有两个输入文本框，输入数字后，点击求和按钮把两个输入框的值求和，并写到第三个文本框中；
        function addSum() {
            let num1 = document.getElementById("num1");
            let num2 = document.getElementById("num2");
            let num3 = document.getElementById("num3");
            let num = parseInt(num1.value)+parseInt(num2.value);
            num3.value = num;
        }
    </script>
</head>
<body>

文本框1：<input id="num1" type="text"><br>
文本框2：<input id="num2" type="text"><br>
文本框3：<input id="num3" type="text"><br>

<button id="btn" onclick="addSum()">点击求和</button>

</body>
</html>